-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate OpenAPI spec during compile #1279
base: master
Are you sure you want to change the base?
Conversation
…mpatibility issue with CRA
… UserService.test.ts
More warnings, these seem to be connected to the client generation:
|
But despite the warnings, the UI works :) |
.then((client) => client.postUserLogin(null, { ...params, apiKeyValidHours: 1 })) | ||
.then(({ data }) => apiKeySchema.validate(data)); | ||
|
||
export const register = (payload: RegisterParamsPayload) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we generate these values as well? they seem to follow the same pattern, and that they can be fully computed from the API spec? this applies to the validation as well, doesn't it exactly follow what's in the OpenAPI schema?
…ooka into generate-openapi-spec
@katekozlowska I think the minimal node version needs to be updated? It's 16 now, but when trying with node 16 I get:
Maybe let's update it to the current LTS simply? |
@katekozlowska what about the docs? :) |
.then((client) => client.postUserLogout(null, { apiKey }, secureRequest(apiKey))) | ||
.then(({ data }) => emptySchema.validate(data).then(() => undefined)); | ||
|
||
export const getCurrentUser = (apiKey: string) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katekozlowska it still seems that this code is "mechanical", that is, could be auto-generated. Same for the schemas. Is this something that we can do?
No description provided.